// 函数组合调试
// NEVER SAY DIE --> never-say-die

const fp = require('lodash/fp')


const fn = fp.flowRight(fp.join('-') ,fp.split(' '), fp.toLower)

console.log(fn('NEVER SAY DIE'))

var fn1 = function (word) {
    return word.toLowerCase().replace(/\s+/g, '-') // 匹配空格
  }
  console.log(fn1('NEVER SAY DIE'), 1)